1
/****************************** Module Header ******************************\
2 * Module Name: GlobalBackgroundWorker.aspx.cs
3 * Project: CSASPNETBackgroundWorker
4 * Copyright (c) Microsoft Corporation
6 * This page uses Timer control to display the progress of the BackgroundWorker
7 * object which is working in the application level.
9 * This source is subject to the Microsoft Public License.
10 * See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
11 * All other rights reserved.
13 \*****************************************************************************/
17 namespace CSASPNETBackgroundWorker
19 public partial class GlobalBackgroundWorker
: System
.Web
.UI
.Page
21 protected void Timer1_Tick(object sender
, EventArgs e
)
23 // Show the progress of the Application Level Background Worker.
24 // A Background Worker has been created in Application_Start() method
25 // in Global.asax.cs file.
26 BackgroundWorker globalWorker
= (BackgroundWorker
)Application
["worker"];
27 if (globalWorker
!= null)
29 lbGlobalProgress
.Text
= "Global worker is running: "
30 + globalWorker
.Progress
.ToString();